package com.acme.bankapp.domain.bank;

public class SavingsAccount extends AbstractAccount {

	public SavingsAccount(int balance) {
		super(balance);
	}

	@Override
	public int getMaximumAmountToWithdraw() {
		return getBalance();
	}

	@Override
	public void deposit(int amount) {
		setBalance(getBalance() + amount);

	}
	
	@Override
	public boolean withdraw(int amount) {
		if (amount >= getBalance()) return false;
		setBalance(getBalance() - amount);
		return true;
	}


}
